package com.example.venue_reservation_service.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;
/**
 * 
 * @TableName venue_reservation
 */
@TableName(value ="venue_reservation")
@Data
@NoArgsConstructor
@AllArgsConstructor

public class Reservation implements Serializable {
    /**
     * 编号，主键
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 用户编号
     */
    private Integer userId;

    @TableField(exist = false)
    private String phone;

    /**
     * 场地编号
     */
    private Integer venueId;

    /**
     * 预约开始时间
     */
    private LocalTime startTime;

    /**
     * 预约结束时间
     */
    private LocalTime endTime;

    /**
     * 预约日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate reservationDate;

    /**
     * 签到时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime checkInTime;

    /**
     * 预约状态，-2过期，-1：取消，0：待审核，1：审核通过，未签到，2：已签到
     */
    private Integer auditStatus;

    /**
     * 对应支付信息编号
     */
    private Integer payId;

    /**
     * 签到时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    /**
     * 逻辑删除
     */
    private Integer isDelete;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

}